import {get, post, postSetting} from "./http";

//region 用户请求
// 用户登录请求
export const loginUser = (data) => post(`user/login`, data)
// 用户得到验证码图片
export const loadVerifyImage = () => get(`user/getImg`)
// 用户页面 加载数据 以及分页查询 条件查询数据
export const getAllUsers = (data) => post(`user/getAll`, data);
// 用户界面 加载部门选择框
export const loadDepartment = () => get("department/getAll");
// 删除选择用户
export const deleteUser = (data) => post('user/deleteById', data);
// 添加用户
export const addUser = (data) => post('user/add', data);
// 修改用户
export const updateUser = (data) => post('user/update', data);
// 删除之前的头像信息
export const deleteAvatar = (data) => post('file/deleteImgFile', data);
// 导出数据
export const exportExcel = (data) => postSetting({
    url: 'user/export',
    data: data,
    responseType: 'blob'
})
//endregion


//region 菜单请求
// 加载树状菜单
export const loadTreeMenu = (data) => post(`menu/gerTree`, data);
//endregion






